#pragma once

BEGIN_ARETE_NAMESPACE(io)

	enum ELOG_LEVEL
{
	ELL_NONE,
	ELL_INFO,
	ELL_WARN,
	ELL_ERROR
};

class AELogManager :
	public Ogre::Singleton<AELogManager>
{
public:
	AELogManager(void);
	~AELogManager(void);

	void initialize(const string&);
	void registerScriptLoggers(asIScriptEngine*);
	void createLog(const string&, const string&);
	void destroyLog(const string&);
	void setLogDetail(Ogre::LoggingLevel,const string& = "default");

	void error(const string&);
	void warn(const string&);
	void info(const string&);
	void print(const string&);

	static void log(ELOG_LEVEL, const string&, const string& = "default");

private:
	Ogre::map<string,Ogre::Log*>::type m_logs;

	std::shared_ptr<Ogre::LogManager> m_log_manager;
};

END_ARETE_NAMESPACE